<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-on的基本使用</title>
</head>
<script src="../js/vue.js"></script>
<body>
<p>
    v-on用来监听界面上用户的点击，拖拽，键盘等事件的操作
</p>
<p>
    v-on:click=可以简写为：@click=
</p>

<div id="app">
    <h2>{{count}}</h2>
    <button @click="count++">加</button>
    <button @click="count--">减</button>
</div>
</body>

<script>
    const app = new Vue({
        'el': '#app',
        data: {
            count: 0
        }
    })
</script>
</html>